#include "orangepch.h"
#include "FrameBuffer.h"
#include "Renderer.h"
#include "Platform/OpenGl/OpenGlFrameBuffer.h"

namespace Orange {
	Ref<FrameBuffer> FrameBuffer::Create(const FrameBufferSpecification& spec) {
		switch (Renderer::GetAPI())
		{
		case RendererAPI::API::None: ORANGE_CORE_ASSERT(false, " RenderApi is not support! "); return nullptr;
		case RendererAPI::API::OpenGl: return CreateRef<OpenGlFrameBuffer>(spec);
		}

		ORANGE_CORE_ASSERT(false, " RenderApi unknown! ")
			return nullptr;
	};
}